/**
 * @author:linjiye
 * @date:2024/12/30
 * @desc:
 **/

import {StyleSheet, Text, View,Image} from 'react-native'
import React from 'react'

type Props = {
    hintText?:string,
    hintIcon?:string
}

const icon = require('@/assets/images/public/no_data.png')

const NoData = ({hintText,hintIcon=icon,style}: Props) => {
    return (
        <View style={[styles.container,style]}>
            <Image style={styles.hint_img} source={hintIcon} resizeMode={'contain'}></Image>
            {hintText && <Text style={styles.hint_txt}>{hintText}</Text>}
        </View>
    )
}

export default NoData

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: "center",
        alignItems: "center",
        paddingVertical: 30
    },
    hint_img: {
        width: 128,
        height: 128
    },
    hint_txt: {
        fontSize: 14,
        color: 'rgba(0,0,0,0.5)',
        textAlign: 'center',
        lineHeight: 20,
    }
})